{tpl head}
<script type="text/javascript">
<!--
//分组权限全选
function checkGroupAll(obj,nameVal)
{
    if(obj.checked == true)
    {
        $('#col_'+nameVal+' [name="purviews[]"]').attr('checked',true);
    }
    else
    {
        $('#col_'+nameVal+' [name="purviews[]"]').attr('checked',false);
    }
}

//-->
</script>
<form method="Post" name="k_form" action="?c={$classname}&a=update">
    <table id="senfe" class="new_table" width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
        <thead> <tr class="n_bt"><td colspan="9" align="center">工作小助手系统</td></tr>
		<tr><th colspan='9' class="thbt">【{$title}】</th></tr>
	</thead>
        <tbody id="bstable">
            <tr> 
                <td>&nbsp;&nbsp;组名称：</td>
                <td> <input name="rolename" type="text" disabled id="typename" value="{$oj.rolename}"> 
                </td>
            </tr>
            <tr> 
                <td>&nbsp;&nbsp;说明信息：</td>
                <td> <input name="roleinfo" type="text" disabled id="typename" value="{$oj.roleinfo}"> 
                </td>
            </tr>
            {loop $column $k $v}
            <tr> 
                <td height='25' colspan='2' >&nbsp;&nbsp;{$v.columnname} <input type='checkbox' id='checkbox_{$v.columnname}' onclick='checkGroupAll(this,"{$v.columnname}");' />全选</label></td></tr>
            <tr><td height='25' colspan='2' id="col_{$v.columnname}" >&nbsp;&nbsp;
                    <?php
                    $sql="select `actionid`,`actionname`,`unique` from __action where columnid=".$v->columnid.' order by rank asc';
                    $res=db::_query($sql);
                    while($r=db::_object($res)){
                    ?>
                    <input name='purviews[]' type='checkbox' {if in_array($r.unique,$rights)} checked{/if} value='{$r.unique}' />{$r.actionname}
                           <?php }?>

                </td></tr>
            {/loop}
            <tr>
                <td height="35" colspan="2" align="center" ><input name="into_wz" id="submit" class="button" type="submit" value="提交" />
                    &nbsp;<input name="" type="reset" class="button" value="重置" />
                    <input name="id" type="hidden" value="{$id}" />
                </td>
            </tr>
        </tbody>
    </table>
</form>
<div id="tip" style="display: none;width:100px;height: 23px;background: #FFAE00;color: #f00;position: absolute;left:50%;top:50%;text-align: center;line-height: 23px;">设置成功!</div>
</body>
</html>